package com.cy.pj.module.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/*通过此对象封装请求中的参数数据*/
public class  RequestParameter {

    public RequestParameter() {
        System.out.println("RequestParameter()");
    }

    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    public Date getStartDate() {
        return startDate;
    }
    /*当使用pojo对象请求参数时，此注解用于  设置请求参数中指定格式的日期参数*/
    //@DateTimeFormat(pattern = "yyyy/MM/dd")
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "RequestParameter{" +
                "name='" + name + '\'' +
                ", startDate=" + startDate +
                '}';
    }
}
